
import { createStore } from "redux";

type Action = {
    type: string;
    payload: any
}
export type Store = { login: string }
function counterReducers(state:Store, action: Action):Store {
    console.log('counterReducers',state,action)
    switch (action.type) {
        case "AAA":
            return { ...state, login: action.payload }
        default:
            return state
            break;
    }
}

const store = createStore<Store, Action>(counterReducers,{login:'222'})
export default store;